const { Sequelize } = require("sequelize");
// 方法 3: 分别传递参数 (其它数据库)
const sequelize = new Sequelize("test", "root", "123456", {
  host: "localhost",
  dialect: "mysql",
  port: "3308",
  logging: console.log,
});

try {
  async function start() {
    await sequelize.authenticate();
  }
  start();
} catch (error) {
  console.error("Unable to connect to the database:", error);
}
// sequelize.close()
module.exports = sequelize;
